package com.magelink.domain;

/**
 * 响应码
 *
 * @author 梁卓
 *
 */
public enum ResultCodeEnum  {

    success("000000", "success", "公共"),
    authFailed("000001", "鉴权失败", "公共"),
    parameterInvalid("000002", "请求参数不合法", "公共"),
    instanceIDNotExist("000003", "实例ID不存在", "公共"),
    processing("000004", "请求处理中", "公共"),
    othersFailed("000005", "其它服务内部错误", "公共"),

    noEnoughResources("000100", "无可用实例资源分配", "新购商品");

    private final String code;
    private final String literal;
    private final String module;

    ResultCodeEnum(String code, String literal, String module) {
        this.code = code;
        this.literal = literal;
        this.module = module;
    }

    public String getCode() {
        return code;
    }

    public String getLiteral() {
        return literal;
    }

    public String getModule() {
        return module;
    }

    @Override
    public String toString() {
        return code;
    }
}
